From: Richard M. Stallman Date: Thu, 4 Mar 2004 17:25:34 +0000 (+0000) Subject: (Regexps): Explain that ^ and $ have their X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~23803 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=63a68645ba319fa522426d58fd3a0aaa18978f11;p=emacs.git (Regexps): Explain that ^ and $ have their special meanings only in certain contexts. --- diff --git a/man/search.texi b/man/search.texi index ef2d5776232..303074dcf0d 100644 --- a/man/search.texi +++ b/man/search.texi @@ -576,10 +576,18 @@ beginning of a line in the text being matched. Otherwise it fails to match anything. Thus, @samp{^foo} matches a @samp{foo} that occurs at the beginning of a line. +For historical compatibility reasons, @samp{^} can be used with this +meaning only at the beginning of the regular expression, or after +@samp{\(} or @samp{\|}. + @item @kbd{$} is similar to @samp{^} but matches only at the end of a line. Thus, @samp{x+$} matches a string of one @samp{x} or more at the end of a line. +For historical compatibility reasons, @samp{$} can be used with this +meaning only at the end of the regular expression, or before @samp{\)} +or @samp{\|}. + @item @kbd{\} has two functions: it quotes the special characters (including @samp{\}), and it introduces additional special constructs.